#ifndef VISION_H
#define VISION_H

#include "main.h"

#include "protocol.h"


typedef __packed struct 
{  	
	int16_t yawErr; 
	int16_t pitErr; 
	int16_t distance;
	uint8_t shoot_Flag;                      
}amorAttackMsg_t;

typedef __packed struct 
{  	
	int16_t pitchAngle; 
	int16_t yawAngle; 
	int16_t pitchSpeed;
	int16_t yawSpeed;  
}VisionSendMsg_t;

typedef __packed struct 
{  	
	float linear[3]; 
	float angular[3];               
}NavMsg_t;

extern void init_vision_struct_data(void);

extern void nav_data_solve(uint8_t *frame);
extern void get_cmd_vel(float linear[3],float angular[3]);

extern void vision_data_solve(uint8_t *frame);
extern void get_vision_err(int16_t *yaw,int16_t *pit);
extern uint8_t get_vision_shootflag(void);

extern void vision_data_load(send_data_t *send_data);
extern VisionSendMsg_t* get_vision_send_msg(void);

#endif
